package router

import (
	"lang-manage-sys/handler"

	"github.com/gin-gonic/gin"
)

func Init() *gin.Engine {
	r := gin.Default()
	// 2.绑定路由规则，执行的函数
	// gin.Context，封装了request和response
	r.Static("/static", "./static")
	r.POST("/add", handler.Add)
	r.GET("/list", handler.List)
	r.POST("/order", handler.Order)
	r.GET("/orderlist", handler.OrderList)
	r.GET("/orderlogin", handler.OrderLogin)

	return r
}
